package test

/*

import (
	"fmt"
	"net"
	"strconv"
	"time"
)

func main() {
	go producer(10)

	time.Sleep(time.Second * 5)
}

func producer(max int) {

	data := "hello world"
	content := []byte("3" + "\n" + "RPC" + "\n" + strconv.Itoa(len(data)) + "\n" + string(data) + "\n")

	for i := 0; i < max; i++ {
		conn, err := net.Dial("tcp", "172.20.51.130:3309")
		panicErr(err)

		conn.Write(content)

		var b = make([]byte, 512)
		conn.Read(b)
		fmt.Println(string(b))
		conn.Close()
	}
}

func panicErr(err error) {
	if err != nil {
		panic(err)
	}
}
*/
